<template>
  <div class="crumbstyle">
    <template v-for="(item, index) in navs">
      <a href="#" :key="index">
        {{ item.name }}
      </a>
      <template v-if="index < navs.length - 1">/</template>
    </template>
  </div>
  <!-- 
       控制最后一个/不显示 
       index: 0 1 2 
       显示条件 0 1     ==   index<2 
       length:3   
   -->
</template>

<script>
export default {
  props: ["navs"],
};
</script>

<style lang="less" scoped>
.crumbstyle {
  margin-bottom: 10px;
  a {
    text-decoration: none;
    color: #000;
  }
}
</style>
